package com.clarence.admin.controller;


import com.clarence.admin.service.PermissionService;
import com.clarence.base.layerui.NavNode;
import com.clarence.login.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * @author Sunny
 */
@Controller
@RequestMapping("/admin/permission")
public class PermissionController extends BaseController {

	/**
	 * 权限业务对象
	 */
	@Autowired
	private PermissionService permissionService;
	

	

	/**
	 * 角色管理权限保存
	 */
	@RequestMapping(value = "/nav", method = RequestMethod.POST)
	@ResponseBody
	public List<NavNode> nav(Integer uId) {
		return permissionService.getNavMenu(uId);
	}
}
